    cv = geGetWindowCellView()

    pins = '()
   
    terminals_list = cv~>terminals
   
    for(i 0 length(terminals_list) - 1
        name = nth(i terminals_list)~>name
        direction = nth(i terminals_list)~>direction
        ; detecter les bus
        flag = rexMatchp("[<>]" name )
            if(flag == t then
            chaine = parseString( name ":<>")   
            max = atoi(nth(1 chaine))
            for(j 0 max
                sprintf(str "%d" j)
                blase = strcat(nth(0 chaine) "<" str ">")
                pins = append1(pins list(blase direction))
		;;printf("**** %s %s \n" blase pins)
            )
            )   
        if(flag == nil then
            pins = append1(pins list(name direction))
        )
       
    )

	layer = list("m1" "pin")
    cv_layout = geGetWindowCellView()
   
    x1 = 0
    y1 = 0
    x2 = 0.4
    y2 = 0.4


    for(i 0 length(pins) - 1
        terminal_name = car(nth(i pins))
        io = cadr(nth(i pins))
        xc=(x1+x2)/2
        yc=(y1+y2)/2
        geometrie_id = dbCreateRect(cv_layout layer list(x1:y1 x2:y2))
        net_id = dbCreateNet(cv_layout terminal_name)
        term_id=dbCreateTerm(net_id terminal_name io)
         pin_id=dbCreatePin(net_id geometrie_id terminal_name)   
        label=dbCreateLabel(cv_layout list("m1port" "drawing") xc:yc terminal_name "centerCenter" "R0" "stick" 0.2)
        leAttachFig(label geometrie_id)   

        x1 = x1 + 2
        x2 = x1 + 0.4
    )    
